package com.study.hot.jetpack.demo_words.db;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

/**
 * <pre>
 *     author : slx
 *     time   : 2020/03/30
 *     desc   :
 * </pre>
 */
@Entity
public class Words {
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "words_id")
    private Integer wordsId;
    @ColumnInfo(name = "words_chinese")
    private String wordsChinese;
    @ColumnInfo(name = "words_english")
    private String wordsEnglish;
    @ColumnInfo(name = "show_chinese", defaultValue = "1")
    private boolean showChinese = true;  /*是否显示中文翻译*/
    //添加新字段:用于测试数据库更新
   /* @ColumnInfo(name = "words_foo")
    private String foo;
    @ColumnInfo(name = "words_goo")
    private String goo;*/

    public Words() {
    }

    @Ignore
    public Words(String wordsChinese, String wordsEnglist) {
        this.wordsChinese = wordsChinese;
        this.wordsEnglish = wordsEnglist;
    }

    public Integer getWordsId() {
        return wordsId;
    }

    public void setWordsId(Integer wordsId) {
        this.wordsId = wordsId;
    }

    public String getWordsChinese() {
        return wordsChinese;
    }

    public void setWordsChinese(String wordsChinese) {
        this.wordsChinese = wordsChinese;
    }

    public String getWordsEnglish() {
        return wordsEnglish;
    }

    public void setWordsEnglish(String wordsEnglish) {
        this.wordsEnglish = wordsEnglish;
    }

    public boolean isShowChinese() {
        return showChinese;
    }

    public void setShowChinese(boolean showChinese) {
        this.showChinese = showChinese;
    }
}
